﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DSTerminal" targetNamespace="http://tempuri.org/DSTerminal.xsd" xmlns:mstns="http://tempuri.org/DSTerminal.xsd" xmlns="http://tempuri.org/DSTerminal.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="QXYJIIConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="QXYJIIConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.QXYJIIConnectionString.ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TerminalTableAdapter" GeneratorDataComponentClassName="TerminalTableAdapter" Name="Terminal" UserDataComponentName="TerminalTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="QXYJIIConnectionString (Web.config)" DbObjectName="QXYJII.dbo.Terminal" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[Terminal] WHERE (([Id] = @Original_Id))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[Terminal] ([Phone], [TownName], [AreaCode], [Leader], [LeaderPhone], [Statuss], [Lng], [Lat], [RankLevel], [AddDate], [Notes]) VALUES (@Phone, @TownName, @AreaCode, @Leader, @LeaderPhone, @Statuss, @Lng, @Lat, @RankLevel, @AddDate, @Notes)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Phone" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Phone" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TownName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TownName" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@AreaCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="AreaCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Leader" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Leader" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@LeaderPhone" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="LeaderPhone" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Statuss" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Statuss" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@Lng" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="Lng" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@Lat" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="Lat" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RankLevel" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="RankLevel" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@AddDate" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="AddDate" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Notes" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Notes" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT Id, Phone, TownName, AreaCode, Leader, LeaderPhone, Statuss, Lng, Lat, RankLevel, AddDate, Notes FROM dbo.Terminal</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[Terminal] SET [Phone] = @Phone, [TownName] = @TownName, [AreaCode] = @AreaCode, [Leader] = @Leader, [LeaderPhone] = @LeaderPhone, [Statuss] = @Statuss, [Lng] = @Lng, [Lat] = @Lat, [RankLevel] = @RankLevel, [AddDate] = @AddDate, [Notes] = @Notes WHERE (([Id] = @Original_Id))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Phone" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Phone" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@TownName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="TownName" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@AreaCode" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="AreaCode" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Leader" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Leader" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@LeaderPhone" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="LeaderPhone" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Statuss" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Statuss" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@Lng" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="Lng" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Double" Direction="Input" ParameterName="@Lat" Precision="0" ProviderType="Float" Scale="0" Size="0" SourceColumn="Lat" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@RankLevel" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="RankLevel" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@AddDate" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="AddDate" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Notes" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="Notes" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="Phone" DataSetColumn="Phone" />
              <Mapping SourceColumn="TownName" DataSetColumn="TownName" />
              <Mapping SourceColumn="AreaCode" DataSetColumn="AreaCode" />
              <Mapping SourceColumn="Leader" DataSetColumn="Leader" />
              <Mapping SourceColumn="LeaderPhone" DataSetColumn="LeaderPhone" />
              <Mapping SourceColumn="Statuss" DataSetColumn="Statuss" />
              <Mapping SourceColumn="Lng" DataSetColumn="Lng" />
              <Mapping SourceColumn="Lat" DataSetColumn="Lat" />
              <Mapping SourceColumn="RankLevel" DataSetColumn="RankLevel" />
              <Mapping SourceColumn="AddDate" DataSetColumn="AddDate" />
              <Mapping SourceColumn="Notes" DataSetColumn="Notes" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DSTerminal" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DSTerminal" msprop:Generator_UserDSName="DSTerminal">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Terminal" msprop:Generator_TableClassName="TerminalDataTable" msprop:Generator_TableVarName="tableTerminal" msprop:Generator_TablePropName="Terminal" msprop:Generator_RowDeletingName="TerminalRowDeleting" msprop:Generator_UserTableName="Terminal" msprop:Generator_RowChangingName="TerminalRowChanging" msprop:Generator_RowEvHandlerName="TerminalRowChangeEventHandler" msprop:Generator_RowDeletedName="TerminalRowDeleted" msprop:Generator_RowEvArgName="TerminalRowChangeEvent" msprop:Generator_RowChangedName="TerminalRowChanged" msprop:Generator_RowClassName="TerminalRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" msprop:Generator_UserColumnName="Id" type="xs:int" />
              <xs:element name="Phone" msprop:Generator_ColumnVarNameInTable="columnPhone" msprop:Generator_ColumnPropNameInRow="Phone" msprop:Generator_ColumnPropNameInTable="PhoneColumn" msprop:Generator_UserColumnName="Phone">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="TownName" msprop:Generator_ColumnVarNameInTable="columnTownName" msprop:Generator_ColumnPropNameInRow="TownName" msprop:Generator_ColumnPropNameInTable="TownNameColumn" msprop:Generator_UserColumnName="TownName">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AreaCode" msprop:Generator_ColumnVarNameInTable="columnAreaCode" msprop:Generator_ColumnPropNameInRow="AreaCode" msprop:Generator_ColumnPropNameInTable="AreaCodeColumn" msprop:Generator_UserColumnName="AreaCode">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Leader" msprop:Generator_ColumnVarNameInTable="columnLeader" msprop:Generator_ColumnPropNameInRow="Leader" msprop:Generator_ColumnPropNameInTable="LeaderColumn" msprop:Generator_UserColumnName="Leader">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="LeaderPhone" msprop:Generator_ColumnVarNameInTable="columnLeaderPhone" msprop:Generator_ColumnPropNameInRow="LeaderPhone" msprop:Generator_ColumnPropNameInTable="LeaderPhoneColumn" msprop:Generator_UserColumnName="LeaderPhone">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Statuss" msprop:Generator_ColumnVarNameInTable="columnStatuss" msprop:Generator_ColumnPropNameInRow="Statuss" msprop:Generator_ColumnPropNameInTable="StatussColumn" msprop:Generator_UserColumnName="Statuss">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Lng" msprop:Generator_ColumnVarNameInTable="columnLng" msprop:Generator_ColumnPropNameInRow="Lng" msprop:Generator_ColumnPropNameInTable="LngColumn" msprop:Generator_UserColumnName="Lng" type="xs:double" />
              <xs:element name="Lat" msprop:Generator_ColumnVarNameInTable="columnLat" msprop:Generator_ColumnPropNameInRow="Lat" msprop:Generator_ColumnPropNameInTable="LatColumn" msprop:Generator_UserColumnName="Lat" type="xs:double" />
              <xs:element name="RankLevel" msprop:Generator_ColumnVarNameInTable="columnRankLevel" msprop:Generator_ColumnPropNameInRow="RankLevel" msprop:Generator_ColumnPropNameInTable="RankLevelColumn" msprop:Generator_UserColumnName="RankLevel">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="AddDate" msprop:Generator_ColumnVarNameInTable="columnAddDate" msprop:Generator_ColumnPropNameInRow="AddDate" msprop:Generator_ColumnPropNameInTable="AddDateColumn" msprop:Generator_UserColumnName="AddDate" type="xs:dateTime" />
              <xs:element name="Notes" msprop:Generator_ColumnVarNameInTable="columnNotes" msprop:Generator_ColumnPropNameInRow="Notes" msprop:Generator_ColumnPropNameInTable="NotesColumn" msprop:Generator_UserColumnName="Notes">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="500" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Terminal" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>